home *** CD-ROM | disk | FTP | other *** search
/ Chip 2011 November / CHIP_2011_11.iso / Programy / Narzedzia / Aplikacje_64-bitowe / Daum_PotPlayer / PotPlayer1.5.29332-x64.EXE / PxShader / Deinterlace (blend).txt < prev    next >
Encoding:
Text File  |  2010-05-20  |  376 b   |  20 lines

  1. // deinterlace (blend)=ps_2_0
  2. // Code from MPC
  3.  
  4. sampler s0 : register(s0);
  5. float4 p0 : register(c0);
  6.  
  7. #define width (p0[0])
  8. #define height (p0[1])
  9.  
  10. float4 main(float2 tex : TEXCOORD0) : COLOR
  11. {
  12.     float4 c0 = tex2D(s0, tex);
  13.     
  14.     float2 h = float2(0, 1/height);
  15.     float4 c1 = tex2D(s0, tex-h);
  16.     float4 c2 = tex2D(s0, tex+h);
  17.     c0 = (c0*2+c1+c2)/4;
  18.     
  19.     return c0;
  20. }